/*
 * Author: vdaras
 */

#ifndef SCRIPTREFTYPE_H
#define	SCRIPTREFTYPE_H

/**
 * Classes that need to be reference counted inherit this class.
 */

class ReferenceCounted
{
protected:
    int m_refCount;

public:

    /**
     * Constructor initializes references to 1.
     */

    ReferenceCounted();


    virtual ~ReferenceCounted();


    /**
     * Increases references to this object.
     */

    virtual void IncRef();


    /**
     * Decreases references to this object. 
     */

    virtual void DecRef();
};

#endif	/* SCRIPTREFTYPE_H */

